﻿@{
    Layout = null;
}


<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="zh" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8" />
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    @Html.Partial("_Title")
    @Html.Raw(ViewBag.CssFile)
</head>
<body class="fixed-top">
    <div class="row-fluid" style="border: 1px solid #DDDDDD;">
        用户编号/名称:<input id="txtUser" name="txtUser" type="text" class="searchinfo" />&nbsp;&nbsp;
        <a id="gritter-remove-all" class="btn btn-info" href="javascript:void(0)" onclick="User_Common.PageClick(1)">搜索</a>
    </div>
    <table class="table table-striped table-bordered table-hover" id="dialog_tabInfo" style="margin-bottom: 0px;">
        <thead>
            <tr class="widget-title">
                <th style="width: 8px;"><input type="checkbox" class="group-checkable"/></th>
                <th class="hidden-480">用户名</th>
                <th class="hidden-480">编号</th>
                <th class="hidden-480">真名</th>
                <th class="hidden-480">Email</th>
                <th class="hidden-480">联系方式</th>
                <th class="hidden-480">部门</th>
                <th class="hidden-480">角色</th>
            </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
    <div id="dialog_mypager" class="row-fluid">
    </div>
    <script type="text/ecmascript">
        var User_Common = {
            PageClick: function (pageIndex, pageSize) {
                pageSize = pageSize == undefined ? 7 : pageSize;
                var search = $("#txtUser").val();
                var param = {};
                param["PageIndex"] = pageIndex;
                param["PageSize"] = pageSize;
                param["search"] = search;
                $.gitAjax({
                    url: "/UserAjax/GetAdminList",
                    data: param,
                    type: "post",
                    dataType: "json",
                    success: function (result) {
                        var json = result;
                        var Html = "";
                        if (json.Data != undefined && json.Data.List != undefined && json.Data.List.length > 0) {
                            $(json.Data.List).each(function (i, item) {
                                Html += "<tr>";
                                Html += "<td><input type=\"checkbox\" name=\"user_item\" class=\"checkboxes\" data-value=\"" + escape(JSON.stringify(item)) + "\" value=\"" + item.UserCode + "\"/></td>";
                                Html += "<td>" + item.UserName + "</td>";
                                Html += "<td>" + item.UserCode + "</td>";
                                Html += "<td>" + item.RealName + "</td>";
                                Html += "<td>" + item.Email + "</td>";
                                Html += "<td>" + item.Mobile + "</td>";
                                Html += "<td>" + item.DepartName + "</td>";
                                Html += "<td>" + item.RoleName + "</td>";
                                Html += "</tr>";
                            });
                        }
                        $("#dialog_tabInfo tbody").html(Html);
                        $("#dialog_mypager").minpager({ pagenumber: pageIndex, recordCount: json.RowCount, pageSize: pageSize, buttonClickCallback: PageClick.PageClick });
                        $("#dialog_tabInfo").find("input[type='checkbox']").attr("checked", false);
                    }
                });
            }
        }
        User_Common.PageClick(1, 7);
    </script>
</body>
</html>
